/*
*	File: Matrix.h
*	Date: 12/06/2011
*	Author: Ivan Gao
*	Desc: The matrix is colum major.
*/
#ifndef SMATRIX_H_
#define SMATRIX_H_
#include "CommonDef.h"
#include "Quaternion.h"
class SIMPLEANIMATION_API SMatrix3x3
{
public:
	union 
	{
		struct  
		{
			float _11, _12, _13;
			float _21, _22, _23;
			float _31, _32, _33;
		};
		struct 
		{
			float v[9];
		};
	};
public:
	SMatrix3x3 ();
	SMatrix3x3 (float _f11, float _f12, float _f13, 
		float _f21, float _f22, float _f23,
		float _f31, float _f32, float _33);
	SMatrix3x3 (const SMatrix3x3 & rMtx);
	SMatrix3x3 (const SQuaternion & rQua);
	SMatrix3x3 (float weight, const SMatrix3x3 & m);
	~SMatrix3x3 ();
public:
	SMatrix3x3 & operator = (const SQuaternion & rQua);
	SMatrix3x3 & operator = (const SMatrix3x3 & rMtx);
	SMatrix3x3 & operator *= (const SMatrix3x3 & rMtx);
	SMatrix3x3 & operator *= (float scale);
	float Determinant () const;
}; // SMatrix3x3
#endif // SMATRIX_H_